import * as grpc from '@grpc/grpc-js';
/*
 * @Date         : 2024-05-22 07:49:06 星期3
 * @Author       : xut
 * @Description  :
 */
import { Observable } from 'rxjs';

export interface HelloService {
  bidiHello(upstream: Observable<HelloRequest>): Observable<HelloResponse>;
  LotsOfGreetings(
    upstream: Observable<HelloRequest>,
  ): Observable<HelloResponse>;
}

export interface HelloServiceClient extends grpc.Client {
  bidiHello(
    metadata: grpc.Metadata,
    options?: grpc.CallOptions,
  ): grpc.ClientDuplexStream<HelloRequest, HelloResponse>;
  bidiHello(
    options?: grpc.CallOptions,
  ): grpc.ClientDuplexStream<HelloRequest, HelloResponse>;

  LotsOfGreetings(
    metadata: grpc.Metadata,
    options: grpc.CallOptions,
    callback: grpc.requestCallback<HelloResponse>,
  ): grpc.ClientWritableStream<HelloRequest>;
  LotsOfGreetings(
    metadata: grpc.Metadata,
    callback: grpc.requestCallback<HelloResponse>,
  ): grpc.ClientWritableStream<HelloRequest>;
  LotsOfGreetings(
    options: grpc.CallOptions,
    callback: grpc.requestCallback<HelloResponse>,
  ): grpc.ClientWritableStream<HelloRequest>;
  LotsOfGreetings(
    callback: grpc.requestCallback<HelloResponse>,
  ): grpc.ClientWritableStream<HelloRequest>;
}

export interface HelloRequest {
  greeting: string;
}

export interface HelloResponse {
  reply: string;
}
